package com.taxi.driver.util;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

import com.taxi.driver.config.IConstants;
import com.taxi.driver.module.account.modify.PwdModifyActivity;
import com.taxi.driver.module.main.mine.evaluation.EvaluationActivity;
import com.taxi.driver.module.main.mine.help.HelpCenterActivity;
import com.taxi.driver.module.main.mine.help.feedback.FeedbackActivity;
import com.taxi.driver.module.main.mine.help.problem.ProblemActivity;
import com.taxi.driver.module.main.mine.message.MessageActivity;
import com.taxi.driver.module.main.mine.setting.SettingActivity;
import com.taxi.driver.module.main.mine.setting.about.AboutActivity;
import com.taxi.driver.module.main.mine.setting.volume.VolumeActivity;
import com.taxi.driver.module.main.mine.statistical.AssessmentStatisticalActivity;
import com.taxi.driver.module.main.mine.wallet.MyWalletActivity;
import com.taxi.driver.module.main.mine.wallet.bill.BillActivity;
import com.taxi.driver.module.main.mine.wallet.rules.RulesActivity;
import com.taxi.driver.module.main.mine.wallet.withdrawal.WithdrawalActivity;
import com.taxi.driver.module.main.mine.wallet.withdrawalrecord.WithdrawaleRecordActivity;
import com.taxi.driver.module.main.mine.wallet.withdrawalrecord.withdrawldetails.WithdrawDetailsActivity;
import com.taxi.driver.module.order.detail.OrderDetailActivity;
import com.taxi.driver.module.order.ongoing.OrderOngoingActivity;
import com.taxi.driver.module.order.price.PriceCheckActivity;
import com.taxi.driver.module.order.setting.OrderSettingActivity;
import com.taxi.driver.module.recruit.CarInfoEntryActivity;
import com.taxi.driver.module.recruit.DriverCruitActivity;
import com.taxi.driver.module.recruit.DriverInfoEntryActivity;
import com.taxi.driver.module.vo.FaqVO;

public class Navigate {

    /**
     * 跳转订单详情
     *
     * @param context
     * @param orderUuid
     * @param refresh   优先从服务端获取数据
     */
    public static void openOrder(Context context, String orderUuid, boolean refresh) {
        Intent intent = new Intent(context, OrderDetailActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        intent.putExtra(IConstants.ORDER_UUID, orderUuid);
        intent.putExtra(IConstants.REFRESH, refresh);
        context.startActivity(intent);
    }

    /**
     * (专车)跳转到费用结算页
     *
     * @param context
     * @param orderUuid
     */
    public static void openPriceCheck(Context context, String orderUuid) {
        Intent intent = new Intent(context, PriceCheckActivity.class);
        intent.putExtra(IConstants.ORDER_UUID, orderUuid);
        context.startActivity(intent);
    }

    /**
     * 跳转到订单页(进行中订单)
     *
     * @param context
     */
    public static void openOrderOngoing(Context context, String orderUuid) {
        Intent intent = new Intent(context, OrderOngoingActivity.class);
        intent.putExtra(IConstants.ORDER_UUID, orderUuid);
        context.startActivity(intent);
    }

    /**
     * 跳转到听单设置
     *
     * @param context
     */
    public static void openOrderSetting(Context context) {
        Intent intent = new Intent(context, OrderSettingActivity.class);
        context.startActivity(intent);
        ((Activity) context).overridePendingTransition(0, 0);
    }

    /**
     * 跳转到我的钱包
     *
     * @param context
     */
    public static void openMyWallet(Context context) {
        Intent intent = new Intent(context, MyWalletActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转到提现
     *
     * @param context
     */
    public static void openWithdrawal(Context context) {
        Intent intent = new Intent(context, WithdrawalActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转到账单
     *
     * @param context
     */
    public static void openBill(Context context) {
        Intent intent = new Intent(context, BillActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转到司机招聘
     */
    public static void openDriverCruiteActivity(Context context){
        Intent intent = new Intent(context, DriverCruitActivity.class);
        context.startActivity(intent);
    }
    /**
     * 跳转到 司机信息录入
     */
    public static void openDriverInfoEntryView(Context context){

        Intent intent = new Intent(context, DriverInfoEntryActivity.class);
        context.startActivity(intent);
    }
    /**
     * 跳转到 车辆信息录入
     */
    public static void openCarInfoEntryView(Context context){

        Intent intent = new Intent(context, CarInfoEntryActivity.class);
        context.startActivity(intent);
    }
    /**
     * 跳转到提现记录
     *
     * @param context
     */
    public static void openWithdrawalRecord(Context context) {
        Intent intent = new Intent(context, WithdrawaleRecordActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开规则说明
     *
     * @param context
     */
    public static void openRules(Context context) {
        Intent intent = new Intent(context, RulesActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开用户评价
     *
     * @param context
     */
    public static void openEvaluation(Context context) {
        Intent intent = new Intent(context, EvaluationActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开考核统计
     *
     * @param context
     */
    public static void openAssenssmentStatisitcal(Context context) {
        Intent intent = new Intent(context, AssessmentStatisticalActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开我的设置
     *
     * @param context
     */
    public static void openSetting(Context context) {
        Intent intent = new Intent(context, SettingActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开语音播报音量
     *
     * @param context
     */
    public static void openVolume(Context context) {
        Intent intent = new Intent(context, VolumeActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开帮助中心
     *
     * @param context
     */
    public static void openHelpCenter(Context context) {
        Intent intent = new Intent(context, HelpCenterActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开消息中心
     *
     * @param context
     */
    public static void openMessageCenter(Context context) {
        Intent intent = new Intent(context, MessageActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开关于
     *
     * @param context
     */
    public static void openAbout(Context context) {
        Intent intent = new Intent(context, AboutActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开修改密码
     *
     * @param context
     */
    public static void openPwdModify(Context context) {
        Intent intent = new Intent(context, PwdModifyActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开建议反馈
     *
     * @param context
     */
    public static void openFeedback(Context context) {
        Intent intent = new Intent(context, FeedbackActivity.class);
        context.startActivity(intent);
    }

    /**
     * 打开提现详情
     *
     * @param context
     */
    public static void openWithdrawaleDetail(Context context, String cashUuid) {
        Intent intent = new Intent(context, WithdrawDetailsActivity.class);
        intent.putExtra("cashUuid", cashUuid);
        context.startActivity(intent);
    }

    /**
     * 打开问题详情页
     *
     * @param context
     * @param faq
     */
    public static void openProblem(Context context, FaqVO faq) {
        Intent intent = new Intent(context, ProblemActivity.class);
        intent.putExtra("faq", faq);
        context.startActivity(intent);
    }
}